package bme.andraskindler.treenventory.db;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.config.AbstractMongoConfiguration;

import com.mongodb.Mongo;
import com.mongodb.MongoClient;

/**
 * A MongoDB összeköttetésért felelős szabványos osztály.
 * @author andraskindler
 *
 */
@Configuration
public class AppConfig extends AbstractMongoConfiguration {
 
	@Override
	public String getDatabaseName() {
		return "treedatabase";
	}
 
	@Override
	@Bean
	public Mongo mongo() throws Exception {
		return new MongoClient("127.0.0.1");
	}
}